package edu.pitt.cs3530.controllers;

import java.util.Map;

/**
 * This class is a the base class that all Predictor and Reactor Controllers
 * must extend from. It stores information related to the thresholds and time it
 * will take to change the state of the application servers
 */
public abstract class Controller {

	protected double upperThreshold;
	protected double lowerThreshold;
	protected long timeToScaleUp;
	protected long timeToScaleDown;
	protected long timeToTurnOn;
	protected long timeToTurnOff;

	/**
	 * Standard constructor except parameter map is unused. It's required here
	 * to force all implementing classes to accept a parameter map for the sake
	 * of normalcy
	 */
	public Controller(double upperThreshold, double lowerThreshold,
			long timeToScaleUp, long timeToScaleDown, long timeToTurnOn,
			long timeToTurnOff, Map<String, String> parameterMap) {
		this.upperThreshold = upperThreshold;
		this.lowerThreshold = lowerThreshold;
		this.timeToScaleUp = timeToScaleUp;
		this.timeToScaleDown = timeToScaleDown;
		this.timeToTurnOn = timeToTurnOn;
		this.timeToTurnOff = timeToTurnOff;
	}
}
